package messagesvc.biz.impl;

import cn.ucloud.microsf.messagesvc.biz.SubscribeService;
import cn.ucloud.microsf.messagesvc.orm.entity.SubscribeEntity;
import cn.ucloud.microsf.messagesvc.orm.mapper.SubscribeMapper;
import cn.ucloud.microsf.messagesvc.orm.model.SubscribeDO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class SubscribeServiceImpl extends ServiceImpl<SubscribeMapper, SubscribeEntity> implements SubscribeService {

  @Override
  public List<SubscribeDO> getByTempCode(String tmpCode) {
    Map<String,String> req = new HashMap<>();
    req.put("tmp_code", tmpCode);
    return baseMapper.searchList(req);
  }

  @Override
  public List<SubscribeDO> getBySubId(String subId) {
    Map<String,String> req = new HashMap<>();
    req.put("sub_id", subId);
    return baseMapper.searchList(req);
  }
}
